<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class NeighborHelpCreateRequest extends BasicRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
        	'title'				=> 'bail|min:2',
            'description'		=> 'bail|required|min:2',
			'images'			=> 'bail|json',
        ];
    }
    
    public function messages()
	{
		return [
			'title.min'				=> '标题太短了，多写一点吧',
			'description.required'	=> '请填写内容',
			'description.min'		=> '内容太少了，多写一点吧',
			'images.json'			=> '图片参数规则错误',
		];
	}
}
